package com.example.footballsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.footballsystem.entity.Master;
import com.example.footballsystem.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.accept.MappingMediaTypeFileExtensionResolver;

import java.sql.*;
@Mapper
public interface MasterAccountMapper extends BaseMapper<Master> {
    @Select("select * from master where Account=#{account}")
    public Master getAccount(String account);
    @Select("select password from master where account=#{account}")
    public String getPassword(String account);
    @Insert("insert into master(account, password, username, phone, email,createdate) values(#{account},#{password},#{username},#{phone},#{email},#{createDate})")
    public Integer addMaster(Master master);
    @Update("update master set createdate=#{timestamp} where Account=#{account}")
    public Boolean setCreateTime(Timestamp timestamp,String account);
}
